{{define "Title"}}Repair{{end}}
{{define "Content"}}
  
<script type=text/javascript src="/js/enterKey.js"></script>
<script type=text/javascript src="/js/repairflow.js"></script>
<script type=text/javascript src="/js/createRprAct.js"></script>

<div class="container-fluid">
<form class="form-horizontal" action="/repairflow" method="POST">
  <fieldset>
    <legend><b>Repair</b></legend>
    {{if .error}}<div class="alert alert-error"><b>Error: </b>{{.error | html}}</div>
    {{else }}
      {{if .flash}}<div class="alert alert-success"><b>Infomation: </b>{{.flash | html}}</div>{{end}}
    {{end}}
    <div class="control-group">
      <label class="control-label">Product No.&nbsp;</label>
      <div class="control">
        <input type="text" class="input-large" id="ssninputid" name="ssninputid" style="font-weight: bold; text-transform:uppercase; background-color: #FFFFD0;" onblur="txtKeyDown();" onkeydown="clicka();" maxlength="50"> <b style="color: red">*</b>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">Fail Code&nbsp;</label>
      <div class="control">
        <label class="control-label" id="failcode" name="failcode" style="font-weight: bold; font-size: 16px; text-align:left; padding-left:10px;"></label>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">Fail Description&nbsp;</label>
      <div class="control">
        <label class="control-label" id="faildesc" name="faildesc" style="font-weight: bold; font-size: 16px; width:auto; text-align:left; padding-left:10px;"></label>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">Repair Type&nbsp;</label>
      <div class="control">
        <select id="repairtype" name="repairtype" style="background-color: #FFFFD0" onkeydown="clicka();" onmousewheel="return false">  
          <option value="REPAIR">REPAIR
          <option value="NDF">NDF
          <option value="REPLACE">REPLACE
          <option value="SCRAP">SCRAP
          <option value="OTHER">OTHER
        </select> <b style="color: red">*</b>
      </div>
    </div>
    <span id=obj1 style="color: black">
      <div class="control-group">
        <label class="control-label">Repair Action&nbsp;</label>
        <div class="control">
          <select id="repairact" name="repairact" onkeydown="clicka();" onmousewheel="return false">  
            <option value="">
          </select>
        </div>
      </div>
    </span>
    <div class="control-group">
      <label class="control-label">Repair Description&nbsp;</label>
      <div class="control">
        <select id="repairdesc" name="repairdesc" style="background-color: #FFFFD0" onkeydown="clicka();" onmousewheel="return false">  
          <option value="">
          {{range .rprcodes}}
            <option value="{{.Data | html}}">{{.Data | html}}
          {{end}}
        </select> <b style="color: red">*</b>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">Fail Part&nbsp;</label>
      <div class="control">
        <input type="text" class="input-large" id="failpart" name="failpart" onkeydown="clicka();" maxlength="50">
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">Old Part No.&nbsp;</label>
      <div class="control">
        <input type="text" class="input-large" id="oldpart" name="oldpart" onkeydown="clicka();" maxlength="50">
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">New Part No.&nbsp;</label>
      <div class="control">
        <input type="text" class="input-large" id="newpart" name="newpart" onkeydown="clicka();" maxlength="50">
      </div>
    </div>
    <div class="form-actions">
      <button type="submit" class="btn btn-primary">Repaire</button>
    </div>
  </fieldset>
</form>
</div>

<input type=button id="btnrepair" value="Repair" style="display:none">

{{end}}